import Vue from 'vue'
import Router from 'vue-router'

import main_page from '../pages/main/main_page';
import order from '../pages/order/order';
import profile from '../pages/profile/profile';
import search from '../pages/search/search';
import login from '../pages/login/login';
import login_pwd from '../pages/login/login_pwd';
import store_detail from '../pages/store_detail/store_detail'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      redirect: 'main',
    },
    {
      path: '/main',
      component: main_page,
      meta: {
        show_foot_nav: true
      }
    },
    {
      path: '/profile',
      component: profile,
      meta: {
        show_foot_nav: true
      }
    },
    {
      path: '/order',
      component: order,
      meta: {
        show_foot_nav: true
      }
    },
    {
      path: '/search',
      component: search,
      meta: {
        show_foot_nav: true
      }
    },
    {
      path: '/login',
      component: login,
      meta: {
        show_foot_nav: false
      }
    },
    {
      path: '/login_pwd',
      component: login_pwd,
      meta: {
        show_foot_nav: false
      }
    },
    {
      path: '/detail/:id',
      component: store_detail,
      meta: {
        show_foot_nav: false
      }
    }
  ],
  mode: "history",
})
